import pandas as pd
import warnings
from config import config
from lg_user import ployinterp_column
from scipy.interpolate import lagrange

warnings.filterwarnings("ignore")

# 定义文件列表
table_list = config.job_name

for file in table_list:
    file_name = "../job_data/{}.xls".format(file)

    output_file = "../data_result/{}.xls".format(file)
    print(output_file)

    data = pd.read_excel(file_name)

    for i in data.columns:
        for j in range(len(data)):

            if (data[i].isnull()[j]):
                data[i][j] = ployinterp_column(data[i],j)

    data.to_excel(output_file)